﻿@using Microsoft.AspNet.Identity
@{
    ViewBag.Title = "Music Store";
}
<!DOCTYPE html>
<html>
<head>
    <title>@ViewBag.Title</title>
    @Styles.Render("~/content/css")
    @RenderSection("styles", required: false)
</head>
<body>
    <nav class="navbar navbar-default navbar-static-top">
        <div class="container">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar"></button>
                <a class="navbar-brand" href="/">Music Store</a>
            </div>
            <div id="navbar" class="navbar-collapse collapse">
                <ul class="nav navbar-nav">
                    @if (HttpContext.Current.User.Identity.IsAuthenticated)
                    {
                        <li>
                            <p class="navbar-text">Welcome,@HttpContext.Current.User.Identity.GetUserName()</p></li>
                    }
                </ul>
                <ul class="nav navbar-nav  navbar-right">
                    <li>@Html.ActionLink("Home", "Index", "Home")</li>
                    <li>@{ Html.RenderAction("CartBage", "ShoppingCart"); }</li>
                    @if (HttpContext.Current.User.Identity.IsAuthenticated)
                    {
                        <li>@Html.ActionLink("Sign out", "SignOut", "Account")</li>
                    }
                    else
                    {
                        <li>@Html.ActionLink("Sign in", "Login", "Account", new {returnUrl = HttpContext.Current.Request.Url}, null)</li>
                        <li>@Html.ActionLink("Register", "Register", "Account", new { returnUrl = HttpContext.Current.Request.Url }, null)</li>
                    }
                  
                </ul>
            </div>
        </div>
    </nav>
    <div class="container">
        @if (ViewBag.HasSideBar==null)
        {
            <div class="col-sm-3 genre-sidebar">
                @{ Html.RenderAction("GenreMenu", "Store"); }
            </div>
            <div class="col-sm-9 main-content">
                @RenderBody()
            </div>
        }
        else
        {
            @RenderBody()
        }
    </div>
    <footer class="footer">
        <div class="container">
            <p class="text-muted">Place sticky footer content here.</p>
        </div>
    </footer>
    @Scripts.Render("~/bundles/jquery")
    @Scripts.Render("~/bundles/bootstrap")
    @RenderSection("scripts", required: false)
</body>
</html>
